# -*- coding: utf-8 -*-
"""
Created on Wed Feb 20 14:50:43 2019

@author: Administrator
"""
import numpy as np
#np.where() 用于把数组里的的值的位置找出来，并将标号放到数组里


label = np.array([1,1,1,1,1,2,2,2,5,5,6])
pos_index = np.where(label == 1)[0]
pos_index1 = np.where(label == 1)
print(pos_index)
#----[0 1 2 3 4]
print(pos_index1)
#----(array([0, 1, 2, 3, 4], dtype=int64),)